package com.virtual.rerijaapps.pet.ui;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.RelativeLayout;

import com.androidquery.AQuery;
import com.virtual.rerijaapps.pet.R;
import com.virtual.rerijaapps.pet.data.Event;

public class TareaWidget extends RelativeLayout
{

	private Context mContext;
	
	public AQuery mAquery;
	
	public String mDate, mHour, mDescription;
	
	public Event mEvent = null;
	
	public TareaWidget( Context context )
	{
		super( context, null );
		mContext = context;
		init( context, null );
	}

	public TareaWidget( Context context, AttributeSet attrs )
	{
		super( context, attrs );
		init( context, attrs );
	}

	public TareaWidget( Context context, AttributeSet attrs, int defStyle )
	{
		super( context, attrs, defStyle );
		init( context, attrs );
	}
	
	public void init( Context context, AttributeSet attrs )
	{
		mContext = context;
		View rootView = View.inflate( mContext , R.layout.tarea_widget, this );
		if ( !isInEditMode() )
		{
			mAquery = new AQuery( rootView );
		}
	}
	
	public void setInfo()
	{
		mAquery.id( R.id.tarea_date ).text( this.mDate );
		mAquery.id( R.id.tarea_desc ).text( this.mDescription );
		mAquery.id( R.id.tarea_hour ).text( this.mHour );
	}
}
